import * as API  from './index';

//收货地址列表
export const addressList=(params)=>{
    return API.GET('/api/v1/addresses',params)
}

//获取单条收货地址
export const oneAddress=(params)=>{
    return API.GET(`/api/v1/addresses/${params}`)
}

//新增收货地址
export const addAddress=(params)=>{
    return API.POST('/api/v1/addresses',params)
}

//修改收货地址
export const updateAddress=(params)=>{
    return API.PUT(`/api/v1/addresses/${params.id}`,params)

}

//删除地址
export const delateAddress=(params)=>{
    return API.DELETE(`/api/v1/addresses/${params}`)
}
